<!DOCTYPE HTML>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Power OJ is a powerful online judge for ACM-ICPC contest.">
<meta name="author" content="power721">
<base href="${baseUrl!}/" />
<title><#if pageTitle??>${pageTitle!} -- </#if>${siteTitle!}</title>

<!-- styles -->
<link href="assets/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="assets/css/oj.css" type="text/css" rel="stylesheet">
<link href="assets/css/oj-icons.css" type="text/css" rel="stylesheet">

<@block name="styles"></@block>

<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
    <script src="assets/js/html5shiv.js"></script>
  <![endif]-->
<script type="text/javascript" src="assets/js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="assets/js/oj.js"></script>

<#if gaAccount??>
<script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', '${gaAccount}']);
      _gaq.push(['_trackPageview']);
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();
    </script>
</#if>
</head>

<body>

  <!-- Navbar
    ================================================== -->
  <div class="navbar navbar-inverse navbar-fixed-top">
    <div class="navbar-inner">
      <div class="container">
        <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
          <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span>
        </button>
        <a class="brand" href="./">LinuxGroup</a>
        <div class="nav-collapse collapse">
          <ul class="nav">
            <li class="<#if actionKey=="">active</#if>"> <a href="./"><i class="icon-home"></i>Home</a>
            </li>
            <li class="<#if controllerKey=="bbs">active</#if>"> <a href="bbs"><i class="icon-comment"></i>Web Board</a>
            </li>
            <li class=""><a href="contest"><i class="icon-fire"></i>Contest</a></li>
            <li class="<#if controllerKey=="contest"&&methodName=="show" || methodName=="problem">active</#if>"> <a href="contest/show/${cid!}"><i
                class="icon-list"></i>Problems</a>
            </li>
            <li class="<#if methodName=="rank">active</#if>"> <a href="contest/rank/${cid!}"><i class="icon-signal"></i>Standing</a>
            </li>
            <li class="<#if methodName=="status" || methodName== "problem_status" || controllerKey=="solution">active</#if>"> <a
              href="contest/status/${cid!}"><i class="icon-check"></i>Status</a>
            </li>
            <li class="<#if methodName=="statistics">active</#if>"> <a href="contest/statistics/${cid!}"><i class="icon-flag"></i>Statistics</a>
            </li>
          </ul>
          <ul class="nav pull-right">
            <#if user??>
            <li class="dropdown active"><a href="#" class="dropdown-toggle <#if adminUser??>admin</#if>" data-toggle="dropdown"><i class="icon-user"></i>${user.name!"user"}
                <b class="caret"></b></a>
              <ul class="dropdown-menu">
                <li><a href="user/profile/${user.name!}">Profile</a></li>
                <li><a href="mail">Mail</a></li>
                <li><a href="user/loginlog">Login Log</a></li>
                <li class="divider"></li>
                <li class="nav-header">Admin</li>
                <li><a href="user/edit">Edit</a></li>
                <li><a href="user/archive">Archive</a></li>
              </ul></li>
            <li class="active"><a href="logout"><i class="icon-off"></i>Logout</a></li> <#else>
            <li class="<#if actionKey=="login">active</#if>"> <a href="#" data-toggle="modal" data-target="#loginModal"><i class="icon-user"></i>Login</a>
            </li>
            <li class="<#if actionKey=="signup">active</#if>"> <a href="signup"><i class="icon-star"></i>Signup</a>
            </li> </#if>
          </ul>
        </div>
      </div>
    </div>
  </div>

  <!-- Masthead
  ================================================== -->
  <header class="jumbotron subhead" id="overview">
    <div class="container">
      <h2>Power OJ</h2>
    </div>
  </header>

  <!-- main content
    ================================================== -->
  <div class="container">
    <div class="row">
      <div class="span12">

        <#if msg??>
        <div class="row">
          <div class="span5 offset4">
            <div class="alert alert-${msgType!"success"}">
              <button type="button" class="close" data-dismiss="alert">&times;</button>
              <h4>${msgTitle!"Success"}</h4>
              ${msg!}
            </div>
          </div>
        </div>
        </#if>
        <@block name="content"></@block>
      </div>
    </div>
    <!-- row -->
  </div>
  <!-- container -->

  <#if !user??>
  <div class="modal hide fade userModal" id="loginModal">
    <form class="form-horizontal" action="user/signin" method="post">
      <div class="modal-header">
        <button class="close" aria-hidden="true" data-dismiss="modal" type="button">×</button>
        <h3 id="loginModalLabel">
          <a href="login" title="Login in another page" data-toggle="tooltip" data-placement="bottom">Login</a>
        </h3>
      </div>
      <div class="modal-body">
        <div class="control-group">
          <div class="controls">
            <span class="help-block">Don't have an account? <a href="signup">Sign up here</a>
            </span>
          </div>
        </div>
        <div class="control-group
            <#if nameMsg??>error</#if>">
          <label class="control-label" for="inputAccount">Account</label>
          <div class="controls">
            <div class="input-prepend">
              <span class="add-on"><i class="icon-user"></i></span>
              <input type="text" id="inputAccount" name="name" value="${name!}" placeholder="User name" required>
            </div>
            <p class="text-error">${nameMsg!}</p>
          </div>
        </div>
        <div class="control-group">
          <label class="control-label" for="inputPassword"> Password </label>
          <div class="controls">
            <div class="input-prepend">
              <span class="add-on"><i class="icon-lock"></i> </span>
              <input type="password" id="inputPassword" name="password" placeholder="Password" required>
            </div>
          </div>
        </div>
        <div class="control-group">
          <div class="controls">
            <span class="help-block"><a href="user/forget">Forgot Password</a> </span>
          </div>
        </div>
        <div class="control-group">
          <div class="controls">
            <label class="checkbox inline"> <input type="checkbox" name="rememberMe" value="1" checked="checked"> Remember me
            </label>
          </div>
        </div>
      </div>
      <div class="modal-footer">
        <button type="submit" class="btn btn-primary">Login</button>
        <button class="btn" data-dismiss="modal">Cancel</button>
      </div>
    </form>
  </div>
  </#if>

  <!-- Footer
    ================================================== -->
  <footer class="footer">
    <div class="container">
      <div class="copyright">
        ©Copyright 2013 <a href="http://git.oschina.net/power/oj" target="balnk">PowerOJ Rev.${version!}</a>
      </div>
      <ul class="footer-links">
        <li><a href="http://git.oschina.net/power/oj" target="balnk">Source</a></li>
        <li class="muted">&middot;</li>
        <li><a href="faq">F.A.Q</a></li>
        <li class="muted">&middot;</li>
        <li><a href="contact">Contact</a></li>
        <li class="muted">&middot;</li>
        <li><a href="changelog">Changelog</a></li>
      </ul>
    </div>
  </footer>

  <!-- javascript
    ================================================== -->
  <!-- Placed at the end of the document so the pages load faster -->

  <script type="text/javascript" src="assets/bootstrap/js/bootstrap.js"></script>
  <@block name="scripts"></@block>

</body>
</html>
